﻿using BattlelogMobile.Core.Message;
using GalaSoft.MvvmLight.Messaging;
using Microsoft.Phone.Controls;

namespace BattlelogMobile.Client.View
{
    /// <summary>
    /// Copyright information
    /// </summary>
    public partial class CopyrightPage : PhoneApplicationPage
    {
        public CopyrightPage()
        {
            InitializeComponent();
        }

        private void PhoneOrientationChanged(object sender, OrientationChangedEventArgs e)
        {
            bool isPortrait = e.Orientation.Equals(PageOrientation.Portrait) ||
                              e.Orientation.Equals(PageOrientation.PortraitUp) ||
                              e.Orientation.Equals(PageOrientation.PortraitDown);
            Messenger.Default.Send(new PageOrientationChangedMessage(this, isPortrait));
        }

        private void BackKeyPressed(object sender, System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = true;
        }
    }
}